﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace seiacpscs.utilities
{
    public class FileParser
    {
        String filePath;

        public FileParser(String filePath)
        {
            this.filePath = filePath;
        }

        public int[] GetNumbers()
        {
            TextReader textReader = new StreamReader(filePath);
            String content = textReader.ReadLine();

            String[] numbers = content.Split(',');
            int[] integers = new int[numbers.Length];

            for (int i = 0; i < numbers.Length; i++)
            {
                integers[i] = Convert.ToInt32(numbers[i]);
            }
            return integers;
        }

    }
}
